<template>
  <el-dialog :visible.sync="visible" v-dialogDrag :title="title" :close-on-click-modal="false" class="tl-dialog" width="800px" @open="open" @close="close">
    <el-form class="tl-form" ref="form" :model="model" :rules="rules" label-width="150px" :disabled="disableEditSubmit">
<!--			<el-row>-->
<!--				<el-col :span="12">-->
<!--					<el-form-item label="所属项目编码" prop="projectuucode" >-->
<!--						<el-input v-model="model.projectuucode"></el-input>-->
<!--					</el-form-item>-->
<!--				</el-col>-->
<!--				<el-col :span="12">-->
<!--					<el-form-item label="所属WBS编码" prop="wbscode" >-->
<!--						<el-input v-model="model.wbscode"></el-input>-->
<!--					</el-form-item>-->
<!--				</el-col>-->
<!--			</el-row>-->
			<el-row>
<!--				<el-col :span="12">-->
<!--					<el-form-item label="所属任务编码" prop="taskcode" >-->
<!--						<el-input v-model="model.taskcode"></el-input>-->
<!--					</el-form-item>-->
<!--				</el-col>-->
				<el-col :span="12">
					<el-form-item label="当前任务进度" prop="progress" :rules="rules.validateRequire">
            <div class="percentage-input">
              <el-input-number v-model="model.progress" :controls="false" :step="1" :min="0" :max="100" style="width:100%"></el-input-number>
              <span class="percentage-sign">%</span>
            </div>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="反馈内容" prop="remark" :rules="rules.validateRequire">
						<el-input v-model="model.remark" type="textarea" :rows="3"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="备注" prop="description" >
						<el-input v-model="model.description" type="textarea" :rows="2"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button :type="disableEditSubmit === false ? 'text' : 'primary'" @click="doCancelEdit">取消</el-button>
      <el-button type="primary" @click="doSubmitEdit" :loading="saveLoading" v-if="disableEditSubmit === false">确认</el-button>
    </div>
  </el-dialog>
</template>

<script>
/** mixins */
import { mixin_edit } from '@tapui/mixins/mixin_edit'
/** 子组件 */
/** 工具类 */
import { putAction, getAction, postAction, deleteAction } from '@tapui/utils/http'
/** VUE配置 */
export default {
  mixins: [mixin_edit],
  components: { },
  data() {
    return {
      moduleTitle: '任务反馈',
      urlPrefix: '/cbb/cbbPmTaskProgress/',
      url: {
        // 额外的url
      },
      projectuucode: '',
      wbscode: '',
      taskcode: '',
      round: ''
    }
  },
  methods: {
    loaded() {
      // 页面加载完毕执行
    },
    assignDefaultValue() {
      if (this.isAdd) {
        this.$set(this.model, 'projectuucode', this.projectuucode)
        this.$set(this.model, 'wbscode', this.wbscode)
        this.$set(this.model, 'taskcode', this.taskcode)
        this.$set(this.model, 'round', this.round)
      }
    }
  }
}
</script>
<style lang="scss" scoped>
  .percentage-input {
    position: relative;
  }

  .percentage-sign {
    position: absolute;
    right: 10px; /* 根据需要调整位置 */
    top: 50%;
    transform: translateY(-50%);
  }
</style>
